//
//  ViewController.swift
//  ElectricStationBoard
//
//  Created by Galaxy on 16/5/13.
//  Copyright © 2016年 Iris. All rights reserved.
//

import UIKit


class ViewController: UIViewController,BMKMapViewDelegate,BMKCloudSearchDelegate {

    var _mapView: BMKMapView?
    
    override func viewWillAppear(animated: Bool) {
        super.viewWillAppear(animated);
        _mapView?.viewWillAppear();
        _mapView?.delegate = self;
    }
    
    override func viewDidLoad() {
        super.viewDidLoad()
        _mapView = BMKMapView(frame: CGRect(x: 0, y: 0, width: self.view.frame.width, height: self.view.frame.height))
        self.view.addSubview(_mapView!)
        
        
       }
    override func viewWillDisappear(animated: Bool) {
        super.viewWillDisappear(animated);
        _mapView?.viewWillDisappear()
        _mapView?.delegate = nil // 不用时，置nil
    }

   
    //设置tabBarItem方法
        override func didReceiveMemoryWarning() {
        super.didReceiveMemoryWarning()
        // Dispose of any resources that can be recreated.
    }


}

